/**
 * Created by Jimmy on 16/9/23.
 */
//随机产生数字的动画
function showNumberAnim(i, j, number) {
    var numbercell = $("#number-cell-" + i + "-" + j);
    numbercell.css("background-color", getNumberBackgroundColor(number));
    numbercell.css("color", getNumberTextColor(number));
    numbercell.text(number);
    //变大效果
    numbercell.animate({
        width: boardCell,
        height: boardCell,
        top: getTopPos(i, j),
        left: getLeftPos(i, j)
    }, 100);
}

//数字移动的动画
function showNumberMoveAnim(fromX, fromY, toX, toY) {
    var numbercell = $("#number-cell-" + fromX + "-" + fromY);
    //移动效果
    numbercell.animate({
        top: getTopPos(toX, toY),
        left: getLeftPos(toX, toY)
    }, 200);
}

//分数的更新显示
function updateScore(score) {
    $("#score").text(score);
}


function updateBestScore(highScore) {
    $("#bestscore").text(highScore);
}
